home *** CD-ROM | disk | FTP | other *** search
- /*
- File: GridEncode.h
-
- Contains: This is just a very simple encoder that shows how to build GRID and TILE
- resources. The TILE resource is a set of 32x32x1 byte tiles. This encoder
- takes a picture and dices it into 32x32 tiles, which it writes out to output
- file. It then builds a standard grid, repeating the original picture as a
- pattern across the grid.
-
- Eventually, it would be nice to make a program that lets someone graphically
- edit the available list of tiles and the actual GRID resource, much like any
- number of map editors out for various games.
-
-
- Written by: Timothy Carroll
-
- Copyright: Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
- 7/1/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1
- 8/15/96 Timothy Carroll Initial Release
-
-
- */
-
- #ifndef _GRIDENCODE_
- #define _GRIDENCODE_
-
- #pragma once
-
- const int kPICTInputResID = 128; // resource ID of the PICT to dice.
- const int kOutputResID = 500; // resource ID used for the GRID and TILE output
-
- const int kGridWidth = 44;
- const int kGridHeight = 44;
-
- const int kTileSize = 1024; // 32 x 32 x 1 byte
-
- extern OSStatus GridTileEncode (short inputFileResNum, short outputFileResNum);
-
- #endif // _GRIDENCODE_